$def with (url)
<html>
<head>
    <title>Anotador</title>
    <script type="text/javascript" language="javascript">

        function addPlayer() {

            var name = document.getElementById("PlayersName").value;
            var team = document.getElementById("PlayersTeam").value;
            if (name != "" && name != undefined && team != "" && team != undefined) {
                if (team != document.getElementById("Team1Name").value && team != document.getElementById("Team2Name").value)
                    return;

                var canhoto = document.getElementById("cbPlayerLeftFoot").checked;

                var playerText = name + "-" + team;
                playerText += canhoto ? "-L" : "-R";

                document.getElementById("playersList").innerHTML += "<li>" + playerText + "<ol id='" + name + team + "EventList'" + "> </ol>" + "</li>";

                var primeiroJogador = document.getElementById("hiddenPlayersList").value == "";
                var playerValue = ""
                if (!primeiroJogador)
                    playerValue = "#";

                playerValue += "Nome::" + name + ";;" + "Team::" + team + ";;" + "Canhoto::" + (canhoto ? "L" : "R") + ";;" + "Ocorrencias::";

                document.getElementById("hiddenPlayersList").value += playerValue;

                //Limpar os inputs
                document.getElementById("PlayersName").value = "";
                document.getElementById("PlayersTeam").value = "";
                document.getElementById("cbPlayerLeftFoot").checked = false;
            }

        }

        function addEvent() {

            var name = document.getElementById("PlayersName").value;
            var team = document.getElementById("PlayersTeam").value;
            if (name != "" && name != undefined && team != "" && team != undefined && document.getElementById(name + team + "EventList") != undefined) {
                if (team != document.getElementById("Team1Name").value && team != document.getElementById("Team2Name").value)
                    return;

                var marcaGolo = document.getElementById("cbGoal").checked;
                var festeja = document.getElementById("cbCelebration").checked;

                var fazCorte = document.getElementById("Tackle").value;
                var bateBolaParada = document.getElementById("SetPieces").value;
                var fazFalta = document.getElementById("Fault").value;
                var remata = document.getElementById("Shooting").value;
                var zonaCampo = document.getElementById("EventPlace").value;

                //adicionar info do evento ah lista de eventos do jogador actual
                var eventText = "";

                if (marcaGolo)
                    eventText += "Golo,";
                if (festeja)
                    eventText += "Festeja,";

                if (fazCorte != "" && fazCorte != undefined)
                    eventText += fazCorte + ',';

                if (bateBolaParada != "" && bateBolaParada != undefined)
                    eventText += bateBolaParada + ',';

                if (fazFalta != "" && fazFalta != undefined)
                    eventText += fazFalta + ',';

                if (remata != "" && remata != undefined)
                    eventText += remata + ',';

                if (zonaCampo != "" && zonaCampo != undefined)
                    eventText += zonaCampo + ',';

                if (eventText == "")
                    return;

                var primeiraOcorrencia = document.getElementById(name + team + "EventList").innerHTML == "";
                document.getElementById(name + team + "EventList").innerHTML += "<li>" + eventText + "</li>";

                if (primeiraOcorrencia)
                    alert("Primeira ocorrencia");

                //adicionar info do evento ao input field do jogador
                var eventValue = primeiraOcorrencia ? "" : "%";
                eventValue += "MarcaGolo:" + (marcaGolo ? "S" : "N") + ";";
                eventValue += "Festeja:" + (festeja ? "S" : "N") + ";";
                eventValue += "FazCorte:" + fazCorte + ";";
                eventValue += "BateBolaParada:" + bateBolaParada + ";";
                eventValue += "FazFalta:" + fazFalta + ";";
                eventValue += "Remata:" + remata + ";";
                eventValue += "ZonaCampo:" + zonaCampo + ";";

                document.getElementById("hiddenPlayersList").value += eventValue;

                //Limpar os inputs
                document.getElementById("cbGoal").checked = false;
                document.getElementById("cbCelebration").checked = false;
                document.getElementById("Tackle").value = "";
                document.getElementById("SetPieces").value = "";
                document.getElementById("Fault").value = "";
                document.getElementById("Shooting").value = "";
                document.getElementById("EventPlace").value = "";
            }
        }

        function submitForm() {
            try {
                //alert("Submit do form");
                document.getElementById("photoUrl").value = document.getElementById("photo").src;
                document.getElementById("submitType").value = "form";
                document.forms["form1"].submit();
            }
            catch (err) {
                alert("submitForm: " + err.description);
            }
        }

    </script>
</head>
<body>
    <form id="form1" method="post">
    <input type="hidden" id="submitType" name="submitType" />
    <input type="hidden" id="photoUrl" name ="photoUrl"/>
    <h1>
        Anotador
    </h1>
    <br />
    <div id="divPhoto">
        <h2>
            Foto
        </h2>
        <img id="photo" src="$url" alt="Foto" />
    </div>
    <div id="anotador">
        <div id="divGame">
            <h2>
                Jogo
            </h2>
            <b>Nome do jogo</b>
            <input type="text" name="GameName" id="GameName" />
            <br />
            <br />
            <b>Equipa 1</b>
            <input type="text" name="Team1Name" id="Team1Name" />
            <select name="Team1Type" id="Team1Type">
                <option value="">Nada</option>
                <option value="EquipaAtacante">Atacante</option>
                <option value="EquipaDefensora">Defensiva</option>
            </select>
            <br />
            <b>Equipa 2</b>
            <input type="text" name="Team2Name" id="Team2Name" />
            <select name="Team2Type" id="Team2Type">
                <option value="">Nada</option>
                <option value="EquipaAtacante">Atacante</option>
                <option value="EquipaDefensora">Defensiva</option>
            </select>
        </div>
        <br />
        <div id="divAddPlayerOrEventOrBall">
            <input id="buttonAddPlayer" type="button" value="Adicionar jogador" onclick="addPlayer();" />
            <input id="buttonAddEvent" type="button" value="Adicionar ocorrencia" onclick="addEvent();" />
        </div>
        <br />
        <br />
        <div id="divPlayer">
            <h2>
                Jogador
            </h2>
            <input type="hidden" id="hiddenPlayersList" name="hiddenPlayersList" />
            <div id="divPlayersList">
                <ol id="playersList">
                </ol>
            </div>
            <b>Nome</b>
            <input type="text" id="PlayersName" />
            <input type="checkbox" id="cbPlayerLeftFoot" value="LeftFoot" />Canhoto
            <br />
            <b>Equipa</b>
            <input type="text" id="PlayersTeam" />
            <br />
            <br />
            <div id="divEvent">
                <h3>
                    Ocorrencias
                </h3>
                Faz Corte
                <select id="Tackle">
                    <option value="">Nada</option>
                    <option value="Carrinho">Carrinho</option>
                    <option value="CorteCabeca">Corte de Cabeca</option>
                    <option value="Defesa">Defesa</option>
                    <option value="Desarme">Desarme</option>
                    <option value="Interseccao">Interseccao</option>
                </select>
                <br />
                Bate bolas parada
                <select id="SetPieces">
                    <option value="">Nada</option>
                    <option value="Canto">Canto</option>
                    <option value="Livre">Livre</option>
                    <option value="Penalti">Penalti</option>
                </select>
                <br />
                Faz Falta
                <select id="Fault">
                    <option value="">Nada</option>
                    <option value="Agressao">Agressao</option>
                    <option value="Mao">Mao</option>
                    <option value="Puxao">Puxao</option>
                    <option value="Toque">Toque</option>
                </select>
                <br />
                Remata
                <select id="Shooting">
                    <option value="">Nada</option>
                    <option value="Remate">Pe</option>
                    <option value="RemateCabeca">Cabeca</option>
                </select>
                <br />
                Zona do campo
                <select id="EventPlace">
                    <option value="">Nada</option>
                    <option value="Ataque">Ataque</option>
                    <option value="Baliza">Baliza</option>
                    <option value="Defesa">Defesa</option>
                    <option value="MeioCampo">Meio Campo</option>
                </select>
                <br />
                <br />
                <input type="checkbox" id="cbGoal" value="Goal" />Marca golo
                <input type="checkbox" id="cbCelebration" value="Celebration" />Festeja
            </div>
        </div>
        <br />
        <br />
        <div id="divBall">
            <h2>
                Bola
            </h2>
            Zona do campo
            <select name="BallPlace" id="BallPlace">
                <option value="">Nada</option>
                <option value="Area">Area</option>
                <option value="Baliza">Baliza</option>
                <option value="LinhaFinal">Linha Final</option>
                <option value="MeioCampo">Meio Campo</option>
            </select>
            <br />
            <br />
        </div>
        <div id="divSubmit">
            <input id="buttonSubmit" type="button" value="Submeter" onclick="submitForm();" />
        </div>
    </div>
    </form>
</body>
</html>
